/*jshint esversion: 6 */
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import Domtoimage from 'dom-to-image';
import FileSaver from 'file-saver';
import plus from 'vue-h5-plus';
import Mui from 'vue-awesome-mui';
import 'vue-awesome-mui/mui/dist/css/mui.css';
import Html2canvas from 'html2canvas';
import Jquery from 'jquery';
import axios from 'axios';
import Common from './views/common/index';
import Base from './views/common/base';
import { ConfigProvider, DatePicker, message, Modal, Spin } from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
// ConfigProvider 国际化-->中文引入
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import Qs from 'qs';
import moment from 'moment';
// 二维码生成插件
import VueQriously from 'vue-qriously';
import QRCode from 'qrcode';
// 分享
import vshare from 'vshare';
import Share from 'vue-social-share';
import 'vue-social-share/dist/client.css';

Vue.config.productionTip = false;

Vue.prototype.$Domtoimage = Domtoimage;
Vue.prototype.$FileSaver = FileSaver;
Vue.prototype.$Html2canvas = Html2canvas;
Vue.prototype.$Jquery = Jquery;
Vue.prototype.$axios = axios;
Vue.prototype.$Common = Common;
Vue.prototype.$message = message;
Vue.prototype.$Modal = Modal;
Vue.prototype.$qs = Qs;
Vue.prototype.$locale = zhCN;
Vue.prototype.$moment = moment;
Vue.prototype.$QRCode = QRCode;

axios.interceptors.request.use(req => {
    // chenss 20241031 改为nginx 统一转发
    // req.headers['token'] = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhdXRoMCIsInVzZXJQd2QiOiIwZTQ3NzA0Yzc4ODg2MjE0NDUyN2I3NGFjY2Q0NjA2N2EiLCJ1c2VyTmFtZSI6IjBlNDc3MDRjNzg4ODYyMTQ0NTI3Yjc0YWNjZDQ2MDY3YSJ9.fzmC-MgFOReGpwvnmhSDqCWFYceNxAiVG7fC8KTXbMM"
    return req
},
    err => {
        return Promise.reject(err);
    })

Vue.use(plus);
Vue.use(Mui);
Vue.use(Base);
Vue.use(ConfigProvider);
Vue.use(DatePicker);
Vue.use(Modal);
Vue.use(VueQriously);
Vue.use(vshare);
Vue.use(Share);
Vue.use(Spin);

new Vue({
    router,
    render: h => h(App),
}).$mount('#app');
